#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'

pushd frontend
CARGO_TARGET_DIR=../target-trunk trunk build --release --public-url /
popd

cargo run --bin voip_netem --release -- --web-port 8080 --server-name cx-voip --server-tcp-port 5080 --server-udp-port 9360 --static-dir ./dist -- env sip.announce_ip=192.168.6.53 rtp.announce_ip=192.168.6.53 ./signald
